package heliotrope.global
{
	import flash.display.Stage;

	public class GlobalVar
	{
		private static var __instance:GlobalVar;
		public var stage:Stage;
		public function GlobalVar(pvt:PrivateClass)
		{
			
		}

		public static function init():void
		{
			if(GlobalVar.__instance)
			{
				throw new Error("You can't init the GlobalVar twice!")
			}
			GlobalVar.__instance = new GlobalVar(new PrivateClass);
		}
		
		public static function getInstance():GlobalVar
		{
			if(!GlobalVar.__instance)
			{
				throw new Error("You should init the GlobalVar at first!")
			}
			return GlobalVar.__instance;
		}
	}
}

class PrivateClass
{
	public function PrivateClass()
	{
	}
}